package com.study.jvm;

import java.util.ArrayList;
import java.util.List;

public class OomTest {

    public static void main(String[] args) {
        List<Byte[]> list = new ArrayList<>();

        while (true) {
            try {
                Thread.sleep(2000);
                list.add(new Byte[1024 * 1024*2]);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }


    }
}
